package com.sname.car.common.constants;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author songx
 * @date 2018/9/24 4:12
 */
@Component
public class Parameters {
    /**
     * Author song  醉美柳舞之众星捧月
     * Date & Time  2018/9/24 4:13
     * Description  自定义变量类
     */

    /**
     * redis config start
     **/
    @Value("${redis.host}")
    private String redisHost;
    @Value("${redis.port}")
    private int redisPort;
    @Value("${redis.auth}")
    private String redisAuth;
    @Value("${redis.max-total}")
    private int redisMaxTotal;
    @Value("${redis.max-idle}")
    private int redisMaxIdle;
    @Value("${redis.max-wait-millis}")
    private int redisMaxWaitMillis;
    /** redis config end  **/

    /** igro.....   springSecurity  这个写法超级变态 */
    @Value("#{'${security.noneSecurityPath}'.split(',')}")
    private List<String> noneSecurityPath;

    public String getRedisHost() {
        return redisHost;
    }

    public int getRedisPort() {
        return redisPort;
    }

    public String getRedisAuth() {
        return redisAuth;
    }

    public int getRedisMaxTotal() {
        return redisMaxTotal;
    }

    public int getRedisMaxIdle() {
        return redisMaxIdle;
    }

    public int getRedisMaxWaitMillis() {
        return redisMaxWaitMillis;
    }

    public List<String> getNoneSecurityPath() {
        return noneSecurityPath;
    }
}
